import { createRouter, createWebHistory } from 'vue-router'
import HomeView from '../views/HomeView.vue'
import HomeContentView from '@/views/HomeContentView.vue';
import LabProfileView from '@/views/LabProfileView.vue';
import LabIntroduction from '@/components/LabProfile/LabIntroduction.vue';
import OrganizationalStructure from '@/components/LabProfile/OrganizationalStructure.vue';
import NotFoundView from '../views/NotFoundView';
import NewsInformation from '@/components/HomeContent/NewsInformation.vue';
import NoticeAnnouncement from '@/components/HomeContent/NoticeAnnouncement.vue';
import ContentDetailView from '@/views/ContentDetailView.vue';
import OnTheList from '@/components/HomeContent/OnTheList.vue';
import CurrentLeadership from '@/components/LabProfile/CurrentLeadership.vue';
import AcademicCommittee from '@/components/LabProfile/AcademicCommittee.vue';
import HighlevelTalents from '@/components/LabProfile/HighlevelTalents.vue';
import HistoryChange from '@/components/LabProfile/HistoryChange.vue';
import PublicServicesView from '@/views/PublicServicesView.vue';
import SystemDocuments from '@/components/PublicServices/SystemDocuments.vue';
import RecruitmentInformation from '@/components/PublicServices/RecruitmentInformation.vue';
import MaterialDownload from '@/components/PublicServices/MaterialDownload.vue';
import ContactUs from '@/components/PublicServices/ContactUs.vue';
import MaterialDetailView from '@/components/PublicServices/DetailView/MaterialDetailView.vue';
import TalentTeamView from '@/views/TalentTeamView.vue';
import AcademicDirectionLeader from '@/components/TalentTeam/AcademicDirectionLeader.vue';
import ProfessorView from '@/components/TalentTeam/ProfessorView.vue';
import AssociateProfessor from '@/components/TalentTeam/AssociateProfessor.vue';
import LecturerView from '@/components/TalentTeam/LecturerView.vue';
import ForeignTeacher from '@/components/TalentTeam/ForeignTeacher.vue';
import ScientificResearchView from '@/views/ScientificResearchView.vue';
import ResearchArea from '@/components/ScientificResearch/ResearchArea.vue';
import ResearchDirection from '@/components/ScientificResearch/ResearchDirection.vue';
import ResearchProgress from '@/components/ScientificResearch/ResearchProgress.vue';
import ResearchResults from '@/components/ScientificResearch/ResearchResults.vue';
import AcademicExchangeView from '@/views/AcademicExchangeView.vue';
import AcademicExchange from '@/components/AcademicExchange/AcademicExchange.vue';
import CollaborativeInnovation from '@/components/CollaborativeInnovation/CollaborativeInnovation.vue';
import CollaborativeInnovationView from '@/views/CollaborativeInnovationView.vue';
import PartyBuilding from '@/components/PartyBuilding/PartyBuilding.vue';
import PartyBuildingView from '@/views/PartyBuildingView.vue';
import TalentCultivationView from '@/views/TalentCultivationView.vue';
import AdmissionView from '@/components/TalentCultivation/AdmissionView.vue';
import FundingAward from '@/components/TalentCultivation/FundingAward.vue';
import GraduateManagement from '@/components/TalentCultivation/GraduateManagement.vue';
import PostgraduateTraining from '@/components/TalentCultivation/PostgraduateTraining.vue';
import ProvincialHomeView from '@/views/ProvincialHomeView.vue';
import StudentActivity from '@/components/ProvincialHome/StudentActivity.vue';
import StudentAward from '@/components/ProvincialHome/StudentAward.vue';
import StudentEmployment from '@/components/ProvincialHome/StudentEmployment.vue';
import OtherView from '@/components/ProvincialHome/OtherView.vue';

const routes = [
    {
        path: '/',
        name: 'home',
        component: HomeView,
    },
    {
        path: '/HomeContent/',
        name: 'HomeContent',
        component: HomeContentView,
        children: [
            {
                path: 'NewsInformation/',
                name: 'NewsInformation',
                component: NewsInformation,
            },
            {
                path: 'NoticeAnnouncement/',
                name: 'NoticeAnnouncement',
                component: NoticeAnnouncement,
            },
            {
                path: 'OnTheList/',
                name: 'OnTheList',
                component: OnTheList,
            },
        ]
    },
    {
        path: '/LabProfile/',
        name: 'LabProfile',
        component: LabProfileView,
        children: [
            {
                path: 'LabIntroduction/',
                name: 'LabIntroduction',
                component: LabIntroduction,
            },
            {
                path: 'OrganizationalStructure/',
                name: 'OrganizationalStructure',
                component: OrganizationalStructure,
            },
            {
                path: 'CurrentLeadership/',
                name: 'CurrentLeadership',
                component: CurrentLeadership,
            },
            {
                path: 'AcademicCommittee/',
                name: 'AcademicCommittee',
                component: AcademicCommittee,
            },
            {
                path: 'HighlevelTalents/',
                name: 'HighlevelTalents',
                component: HighlevelTalents,
            },
            {
                path: 'HistoryChange/',
                name: 'HistoryChange',
                component: HistoryChange,
            },
        ]
    },
    {
        path: '/PublicServices/',
        name: 'PublicServices',
        component: PublicServicesView,
        children: [
            {
                path: 'SystemDocuments/',
                name: 'SystemDocuments',
                component: SystemDocuments,
            },
            {
                path: 'RecruitmentInformation/',
                name: 'RecruitmentInformation',
                component: RecruitmentInformation,
            },
            {
                path: 'MaterialDownload/',
                name: 'MaterialDownload',
                component: MaterialDownload,
            },
            {
                path: 'ContactUs/',
                name: 'ContactUs',
                component: ContactUs,
            },
        ]
    },
    {
        path: '/TalentTeam/',
        name: 'TalentTeam',
        component: TalentTeamView,
        children: [
            {
                path: 'AcademicDirectionLeader/',
                name: 'AcademicDirectionLeader',
                component: AcademicDirectionLeader,
            },
            {
                path: 'professor/',
                name: 'professor',
                component: ProfessorView,
            },
            {
                path: 'AssociateProfessor/',
                name: 'AssociateProfessor',
                component: AssociateProfessor,
            },
            {
                path: 'lecturer/',
                name: 'lecturer',
                component: LecturerView,
            },
            {
                path: 'ForeignTeacher/',
                name: 'ForeignTeacher',
                component: ForeignTeacher,
            },
        ]
    },
    {
        path: '/ScientificResearch/',
        name: 'ScientificResearch',
        component: ScientificResearchView,
        children: [
            {
                path: 'ResearchArea/',
                name: 'ResearchArea',
                component: ResearchArea,
            },
            {
                path: 'ResearchDirection/',
                name: 'ResearchDirection',
                component: ResearchDirection,
            },
            {
                path: 'ResearchResults/',
                name: 'ResearchResults',
                component: ResearchResults,
            },
            {
                path: 'ResearchProgress/',
                name: 'ResearchProgress',
                component: ResearchProgress,
            },
        ]
    },
    {
        path: '/AcademicExchange/',
        name: 'AcademicExchange',
        component: AcademicExchangeView,
        children: [
            {
                path: 'subpage/',
                name: 'AcademicExchangeSubpage',
                component: AcademicExchange,
            },
        ]
    },
    {
        path: '/CollaborativeInnovation/',
        name: 'CollaborativeInnovation',
        component: CollaborativeInnovationView,
        children: [
            {
                path: 'subpage/',
                name: 'CollaborativeInnovationSubpage',
                component: CollaborativeInnovation,
            },
        ]
    },
    {
        path: '/PartyBuilding/',
        name: 'PartyBuilding',
        component: PartyBuildingView,
        children: [
            {
                path: 'subpage/',
                name: 'PartyBuildingSubpage',
                component: PartyBuilding,
            },
        ]
    },
    {
        path: '/TalentCultivation/',
        name: 'TalentCultivation',
        component: TalentCultivationView,
        children: [
            {
                path: 'admission/',
                name: 'admission',
                component: AdmissionView,
            },
            {
                path: 'PostgraduateTraining/',
                name: 'PostgraduateTraining',
                component: PostgraduateTraining,
            },
            {
                path: 'GraduateManagement/',
                name: 'GraduateManagement',
                component: GraduateManagement,
            },
            {
                path: 'FundingAward/',
                name: 'FundingAward',
                component: FundingAward,
            },
        ]
    },
    {
        path: '/ProvincialHome/',
        name: 'ProvincialHome',
        component: ProvincialHomeView,
        children: [
            {
                path: 'StudentActivity/',
                name: 'StudentActivity',
                component: StudentActivity,
            },
            {
                path: 'StudentAward/',
                name: 'StudentAward',
                component: StudentAward,
            },
            {
                path: 'StudentEmployment/',
                name: 'StudentEmployment',
                component: StudentEmployment,
            },
            {
                path: 'other/',
                name: 'other',
                component: OtherView,
            },
        ]
    },
    {
        path: '/ContentDetail/:option/:id',
        name: 'ContentDetail',
        component: ContentDetailView,
    },
    {
        path: '/MaterialDetail/:id',
        name: 'MaterialDetail',
        component: MaterialDetailView,
    },
    {
        path: '/404/',
        name: '404',
        component: NotFoundView,
    },

    // 重定向
    {
        path: '/:catchAll(.*)',
        redirect: "/404/"
    }
]

const router = createRouter({
    history: createWebHistory(),
    routes
})

export default router
